#pragma once

#include "base/core/singleton.h"
#include "base/core/object_pool.h"
#include "Common/DuplicateDefine.h"
#include "DupStar.h"






//副本星级管理
class StarMgr : public ManualSingleton<StarMgr>
{
	friend class ManualSingleton < StarMgr >;
public:
	StarMgr();
	~StarMgr();
	bool Init();
	void UnInit();
	IStar *MakeStarObj(int8_t bytype);
	void FreeStarObj(IStar *pstar);
	bool RecycleStar(IStar *pStar);
private:
	ObjectPool<StarA> *m_pStarAPool;
	ObjectPool<StarB> *m_pStarBPool;
	ObjectPool<StarC> *m_pStarCPool;
	ObjectPool<StarD> *m_pStarDPool;
	ObjectPool<StarE> *m_pStarEPool;
};

#define g_MakeStarMgr() (StarMgr::Instance())
#define g_GetStarMgr()  (StarMgr::GetInstance())
#define g_DelStarMgr()  (StarMgr::Destroy())